package org.admanager.acmepattern.plugin.diagram.edit.policies;

import org.admanager.acmepattern.plugin.diagram.edit.commands.PComponent2CreateCommand;
import org.admanager.acmepattern.plugin.diagram.edit.commands.PConnector2CreateCommand;
import org.admanager.acmepattern.plugin.diagram.edit.commands.PConnectorRole2CreateCommand;
import org.admanager.acmepattern.plugin.diagram.providers.AcmeADManagementMetamodelElementTypes;
import org.eclipse.gef.commands.Command;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;

/**
 * @generated
 */
public class PConnectorConnectorCompartmentItemSemanticEditPolicy extends
		AcmeADManagementMetamodelBaseItemSemanticEditPolicy {

	/**
	 * @generated
	 */
	public PConnectorConnectorCompartmentItemSemanticEditPolicy() {
		super(AcmeADManagementMetamodelElementTypes.PConnector_3008);
	}

	/**
	 * @generated
	 */
	protected Command getCreateCommand(CreateElementRequest req) {
		if (AcmeADManagementMetamodelElementTypes.PConnectorRole_3009 == req
				.getElementType()) {
			return getGEFWrapper(new PConnectorRole2CreateCommand(req));
		}
		if (AcmeADManagementMetamodelElementTypes.PComponent_3006 == req
				.getElementType()) {
			return getGEFWrapper(new PComponent2CreateCommand(req));
		}
		if (AcmeADManagementMetamodelElementTypes.PConnector_3008 == req
				.getElementType()) {
			return getGEFWrapper(new PConnector2CreateCommand(req));
		}
		return super.getCreateCommand(req);
	}

}
